<template>
    <!-- <a-input @change="inputVal" class="w-full" v-model:value="value" :placeholder="props.placeholder" /> -->
    <a-button @click="clooseFiles">
        <template #icon>
            <sysIcon type="system-shangchuan1"></sysIcon>
        </template>
        选择文件
    </a-button>

</template>
<script setup>
const emits = defineEmits(["update:value", "change"]);
const props = defineProps({
    value: undefined,
    placeholder: {
        type: String,
        default: "请输入",
    },
});
const state = reactive({
    value: undefined,
});
const inputVal = () => {
    emits("update:value", state.value);
    emits("change:change", state.value);
};
function clooseFiles() {
    if (window.appType === "浏览器") {
        message.warning("请在钉钉客户端操作！");
    }
}
watch(
    () => props.value,
    (newVal, oldVal) => {
        if (newVal === null || newVal === "" || newVal === undefined) {
            state.value = undefined;
        } else {
            state.value = newVal.toString();
        }
    },
    { deep: true, immediate: true }
);
defineExpose({});
const { value } = toRefs(state);
</script>

